<template>
    <home-item v-bind:CMenuList="MenuList"/>
</template>

<script>
  import HomeItem from "../../../views/home/HomeItem";
  export default {
      data() {
          return {
              MenuList: []
          }
      },
     created() {
         this.getMenuList()
     },
     name: "Home",
     components: {
         HomeItem
     },
      methods: {
         // 获取所有的菜单
         async getMenuList() {
             const { data: res } = await this.$http.get('menus')
             if (res.meta.status !== 200) return this.$message.error(res.meta.msg)
             this.MenuList = res.data
             console.log(res);
         }
      }
  }
</script>

<style scoped>

</style>